from rest_framework.routers import DefaultRouter
from . import views
from django.urls import path

router = DefaultRouter(trailing_slash=False)
router.register('project',views.ProjectViewSets,basename="project")
router.register('host',views.HostViewSets,basename="host")
router.register('api',views.ApiViewSets,basename="api")
router.register('case1',views.CaseViewSets,basename="case")


app_name = "apitest"
urlpatterns = [
    path('api1',views.ApiView.as_view(),name="api1"),
    path('index',views.IndexView.as_view(),name="index"),
    path('run/api/<int:api_id>',views.RunApiView.as_view(),name="run_api"),
    path('run/case/<int:case_id>',views.RunCaseView.as_view(),name="run_case"),
    path('case',views.CaseView.as_view(),name="case"),
    path('case/<int:case_id>',views.CaseView.as_view(),name="edit_case"),
    path('records',views.RecordView.as_view(),name='records')
] + router.urls
